<include file="./Application/Home/View/Public/header.html" />
<!-- Main content -->
<section class="content">
    <div class="row">
        <!-- left column -->
        <div class="col-xs-12">
            <!-- general form elements -->
            <div class="box box-primary">
                <div class="box-header">
                    <h3 class="box-title">系统设置</h3>
                </div><!-- /.box-header -->
                <!-- form start -->
                <form role="form" action="setwebconf" method="post" id="setW">
                    <div class="box-body">
                        <div class="form-group" id="adddomainerror">
                            <label >系统名称</label>
                            <input type="text" class="form-control" id="wentitleid" placeholder="请输入系统名称" name="title" value="{$webtitle}">
                        </div>
                        <div class="form-group" id="adddomainerror">
                            <label >绑定域名</label>
                            <input type="text" class="form-control" id="wentitleid" placeholder="<?php if('/'==DIRECTORY_SEPARATOR){echo $_SERVER['SERVER_ADDR'];}else{echo @gethostbyname($_SERVER['SERVER_NAME']);} ?>:8888" name="title" value="<?php if('/'==DIRECTORY_SEPARATOR){echo $_SERVER['SERVER_ADDR'];}else{echo @gethostbyname($_SERVER['SERVER_NAME']);} ?>:8888" data-toggle="tooltip" data-placement="top" title="系统默认，不能更改！" readonly="readonly" >
                        </div>
                        <div class="form-group" id="adddomainerror">
                            <input type="text" class="form-control" id="wentitleid" placeholder="请输入系统名称" name="title" value="{$webtitle}" data-toggle="tooltip" data-placement="top" title="您要绑定的域名！">
                        </div>
                    </div><!-- /.box-body -->

                    <div class="box-footer">
                        <button type="button" id="setsub" class="btn btn-primary"><i class="fa fa-check-square-o"></i> 提交</button>
                    </div>
                </form>
            </div><!-- /.box -->
 <script>
$(document).ready(function(){
    $("#setsub").click(function(){
        ZENG.msgbox.show("处理中，请稍候！", 6, 6000000);
        var title = $('#wentitleid').val();
        $.ajax({
        type: "POST",
        url: "setwebconf",
        data: {"WEBTITLE":title},
        success: function(msg){
            if(msg == 1){
                ZENG.msgbox.show("修改成功！", 4, 3000);
            }else if(msg == 2){
                ZENG.msgbox.show("异常错误！", 1, 3000);
            }else{
                ZENG.msgbox.show("修改失败！", 5, 3000);
            }
        }
        });
    });
 });
 </script>
<include file="./Application/Home/View/Public/footer.html" />